
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                            type.h
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                                    Forrest Yu, 2005
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/

#ifndef	_ORANGES_TYPE_H_
#define	_ORANGES_TYPE_H_
#define	MAX_MSG_BUFF	10
#define MAX_WIN_NUM	20
#define ROOT_WIN 9999

typedef	unsigned int		u32;
typedef	unsigned short	u16;
typedef	unsigned char		u8;

typedef	char *			va_list;

typedef	void	(*int_handler)	();
typedef	void	(*task_f)	();
typedef	void	(*irq_handler)	(int irq);

typedef void*	system_call;

enum MessageType{
	MsgMouse,
	MsgKeyboard
};

struct Message{
	enum MessageType Type;
	unsigned char LeftButtonDown;
	unsigned char RightButtonDown;
	unsigned char PressedKey;
	unsigned int MouseX;
	unsigned int MouseY;
	int BelongsTo;
};

struct Window{
	unsigned int ID;
	unsigned int x;
	unsigned int y;
	unsigned int Height;
	unsigned int Width;
	unsigned int Type;//Form 0, CloseButton 1, Maximize 2, Minimize 3, Taskbar 4, ItemTask 5,Label 6
	unsigned int Father;
	int Visible;
	int Alive;
	int HaveLabel;
	char Label[10];
	int Maximized;
	int Minimized;
};
/*
struct Label{
	unsigned int ID;
	unsigned int x;
	unsigned int y;
	unsigned int Father;
	int Visible;
	int Alive;
};
*/
struct MessageQueue{
	int Head;
	int Tail;
	struct Message Queue[MAX_MSG_BUFF];
};



#endif /* _ORANGES_TYPE_H_ */
